This subfolder "Codes_Model" include functions used to solve and evaluate solution accuracy of the model. Files include: 

(1) ODE_noJump.m.
This file calculates derivative pw, given w and p. This function can be used by a standard  Matlab ODE solver. 

(2)ODE.m
This file is the "pseudo ODE" function that takes the last round fitted price function p_fitted as given, and then output pw for any given w and p. The local property of the ODE method has been restored because the jump size is solved from a given functional form of the price function. 

(3)stop_condition_ODE.m
This is the stop condition for both ODE_noJump.m and ODE.m. When the price function reaches a point w_star where psi=1, we can immediately stop the ODE because we know that for all w>w_star, bankers hold all productive capital and the price is just the maximum price p1.

(4)post_processing.m
This function takes in a solved price function, expressed as a price vector p_vec on a grid w_grid. Then the function outputs other key variables of the mode, including jump sizes, liquidity premium, volatility etc.  This function is a standard function for any price vector generated by any solution method on a grid. 

(5)EquationError.m
This function generates the Euler equation errrors expressed in units of price. It takes p_fun, which is a price function handle, pw_vec on a grid w_grid, and w_star, which is the critical value of price reaching the maximum. Then it outputs Euler eequation errors. 









